<template>
  <div>
    哈哈==={{ name }}

    <br>
    <input type="button" name="aa" @click="changeName" value="改名称">
  </div>
</template>

<script>
import {ref} from "vue";

export default {
  name: "App",
  setup() {
    const name = ref('张三三')
    const changeName = () => {
      console.log('改名字。。', name)
      name.value = 'dddd'
    }
    console.log('setup')

    return {
      name,
      changeName
    }
  },
  beforeCreate() {
    console.log('beforeCreate')
  }
}
</script>

<style scoped>

</style>